package it.blueocean.acanto.taglibrary.jsp.taglib.tags.configuration;

public class BootstrapPropertyResolver
{
	private FilterConfig filterConfig;

	public BootstrapPropertyResolver(FilterConfig filterConfig)
	{
		setFilterConfig(filterConfig);
	}

	public void setFilterConfig(FilterConfig filterConfig)

	{
		this.filterConfig = filterConfig;
	}

	public FilterConfig getFilterConfig()

	{
		return this.filterConfig;
	}

	public String getProperty(String key)

	{
		String value = this.filterConfig.getInitParameter(key);

		if(value == null)
		{
			value = this.filterConfig.getServletContext().getInitParameter(key);
		}

		if(value == null)
		{
			value = System.getProperty(key);
		}

		return value;
	}

}